Fix the bug in checkEviction