fix "evict" function