child schema, bug fixes

globals were not being set if created for the first time