Fixed further bugs with renaming