fix bug in loading the schema