fix a bug (register)