fixed bug with 2d images