fixed some form functions