fix renaming bugs