fix bug with delete session