Fixed problem in session resuming