Fixed validation of students/teachers