Changed error handling for modifing a student