fix set last_register_clean in clean active registers