Fixed a registration bug