fix some small incorrect code.