fixes bug in register form