Fixed a crash where the cache fails to clear its objects