All sin leads to sorrow. So the immoral king decides to be moral and keep his oath. How inconsistent!