now the session can be restored. Fixed query bug in read() method in the session manager class