fix for set_main_image func