fix bug while creating several cached images from one source image