bug fix to the register button