Fixed bug with session