fixing broken form functionality