rebased and added test for eviction fix