fix error in form handler