little changes for bitmap caching