Fix error setting values from form state