fix crashing bug caused by recursive set_state() nonsense; sync snap_type, snap_mode...