Fix for different image width and height