fixed some more cache bugs