Fix reading from cache