Added if statement to adding childViewController