Fixed bug which prevents renaming of files