fixes overflowing problem when last element is an image