Corrected the for-loop condition in the auto_mapping_process function. Previously, it was checking if children.size() is non-zero, which resulted in an infinite loop