Bugfix with registration