fix a registration bug