Amr bin Shu'ayb narrates from his father, from his grandfather (may Allah be pleased with them both), that the Prophet (peace and blessings be upon him) said: "The mukatab remains a slave as long as even one dirham of his contract remains due from him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المكاتب / 21638