So they got rid of the foreign gods among them and worshiped the LORD, and he became weary of Israel's misery.