fixed wrong cropping with scaled images