Temporary files renamed and minor bugfix