Fixed a bug in how validation schemas are applied