* some clean up
* assert active_thread pointer before saving it