fix bad cache check