Fixing registration bug