fix directory register after renaming