Fix crash in retrieving cached data