bug fix for forms validation