fixed cache checking