Fixed bugs with images