Fixed session reset bug