Fixed a sessions bug