Fixed problem with renaming directories