fixed a registration bug