Fixed image updating bug