Fix so that 1024 x 768 images are produced correctly.