Fix an issue of registration