Fixed a bug with resizing images. Shouldnt error out now.