finally fixed session var wiping