fix bug for clear session