Added missing test_schemas. Fixed two bugs.