Sometimes, God speaks to us from the standpoint of his righteousness; sometimes, he speaks to us from the standpoint of our wickedness. This makes the Bible appear contradictory at times, providing much-welcomed rhetorical fodder for the sexually deviant.
John 4:16-18 (King James Version)
16Jesus saith unto her, Go, call thy husband, and come hither.
17The woman answered and said, I have no husband. Jesus said unto her, Thou hast well said, I have no husband:
18For thou hast had five husbands; and he whom thou now hast is not thy husband: in that saidst thou truly.
Does Jesus overturn his own verbal precedent? Yes. Does he overturn his own principle? NO! He merely speaks to us from the standpoint of our wickedness, for the sake of his ministry.
Does the WORD of God command slavery? ABSOLUTELY NOT! But the Bible does condone it in light of man's own wickedness. Hence, the Biblical precedent and the Godly principle are at odds. But these contradictions were resolved by the Blood of the New Covenant -- which is why you can't just look to the Old Testament alone when critiquing the Bible.