minor bug fixing in the add child controller helper