Fixed renaming not working properly