fixed crash in update_cache