fixed error when registering from invitation