add test for reset_flag on session