Fixed couple of bugs in SchemaTool