Fix for registration bug