You cannot make an ownership change if there is a debt. When the debt is paid, then you can make the change of ownership. For these cases there are two possibilities:
Change of owner without subrogation: the new owner is separated from any responsibility incurred by the previous owner.
Change of owner with subrogation: the new holder assumes all the conditions agreed in the contract by previous holder.
Keep in mind that if there are outstanding debts, until they are satisfied, the change of ownership cannot be made.