Fixed bug with preview caching