How can this be fixed?
Well, you now have two wallet.dat files which are out of sync. Bitcoin-Qt/bitcoind wasn't designed to work this way (running two copies of the Client with the same wallet.dat). As a result, the two wallet.dat files are now out of sync.
In short, don't do this. It doesn't affect the blockchain, but it will give you grief and multiple copies of a wallet getting out of sync can potentially cause you to end up with financial loss.
To resolve this ... you will have one Client in which the transaction confirms. In the other instance you will have a transaction that won't confirm (presuming both are attempting to spend the same funds).
So, if the balance on the one with the confirmation is correct, then simply discontinue use of the other instance -- the one with the transaction that will never confirm.