fixed uploadNewPictures is not defined