Revert "Revert "Fixed name change behavior""

This reverts commit 150d35dfb7b0f3a9aff179e777d07496482c8260.
Fixed crash