Fix the rename bugs