Fix of fatal error on form validation