Fixed registration bug