Fix incorrect cache cleaning