Fix for empty space problem during image comparison