Fixed bug with image dimension