fixes image and pdf file names when new names are generated