Fix cases when upscale was False but only the width or height was defined