Bugfix for registration bug