Fixed bug in the MediaCacheProvider. See issue #145