Register form bug fix