fixing null values on submit