fixed some form functionality