fix bug that caused cache hits to get lost