If there have not been any transactions, you can remove the Master # from the child machine.
If there are transactions on the child contract, you will not be able to remove the Master# in the header:
In this case, you will need to set the child status to Finish, and create a new one if required. You can then link this to the correct master.
Further information
How to