Changed order of validation