Fix bugs in pre-registration