Sunan An-Nasa'i
Hadith #4811
It was narrated from Ibn 'Abbas tht the Prophet said:""The Mukatab is free to the extent that the has paid off (toward buying his freedom); he Hadd punishment should be carried out on him proportionate to the amount he has paid off (toward buying his freedom); and he inherits proportionate to the amount he has paid off (toward buying his freedom)