Hi if the house is repossessed and then sold the loan automatically becomes unsecured. The unsecured remainder of the debt may then be written off in bankruptcy but you need to get the timing of events and your court documentation right to ensure this.