fixed reset_to_clean_state