Fix bug with rename.