fixed bug for session