fixed sessions bug