Fixing error with registration