Fix broken name after replace