fixed bugs with lingering sessions