Fixed some schema handling issues