Some errors in the formvalues() function