Fix to detect image size miss match