fix delete when cache is on