small bugfix in register