fix ordering from images