session on_destruction_state flag and check added