fixed bugs with images