fix show error page if form is invalid