Bug fixes to the schema