corrected bug for session