fixed issue with image processing