fixed bug to display errors properly when a form does not validate