prevent images from overflowing