some fixes to the schema flow