Fix notice caused by cache misses