Psalm 119:67 in the King James Version
Before I was afflicted I went astray: but now have I kept thy word.
Context
66 Teach me good judgment and knowledge, for I believe in your commandments.
67 Before I was afflicted, I went astray; but now I observe your word.
68 You are good, and do good. Teach me your statutes.