fix for non contiguous images
Merge branch 'devel'