bug in session library

there is a little bug in session I believe in session library, have a look 
I don't think there is need to display an error message in that function