Fixed some renaming bugs