fixed a bug in serializeForm()