Fixed infinite loop in schema manager.