Fix syncPictures loop bug