Fix two errors in complete_registration()