Yes Rob they had to work off their debt (I will work for food). And back then if someone commited a crime you could pay their fine and buy them to work off their offence instead of jail, for 6 to 7 years. You were their warden or master, and they were called slaves or bondman. But you had to treat them right and pay them something when their sentence was over, it was GODS law.
http://www.biblegateway.com/passage/?search=Deuteronomy+15%3A12-15&version=KJV