fix serialization of form fields