Fix nil error after cache cleanup