[Title] Fixed 'renameDocument' internal logic