required field bug fix