Fixed validation and schema creation.