Fixed minor bug in renaming.