bugfix in register