fixs sessions bugs