fixed renaming bugs