fix bug of retrieving when session expired and issue #42