Fixed session cleanup