2Chron25:2 And he did that which was right in the sight of the Lord, but not with a perfect heart.
King Amaziah did what was right in God's sight but with an imperfect heart. God's remark on this king may look abnormal to the human senses but it is a revelation of a spiritual reality that most of us don't see. That leaves us with the fact that it is possible to do the right thing with the wrong heart or motive.
God's evaluation of our actions takes into consideration the state of our heart and the motive behind our actions. Why are you doing what you are doing? It is good that we get things right from inside before we manifest on the outside. Are you not trying to spite someone with your so called good works? It is possible to preach, teach, sing and evangelize just to prove a point.
Stop living your life to prove a point. Trying to do that makes good actions to thrive on the soil of a heart that is corrupted and desirous of wanting to show-off in a bid to spite or get back at someone. David knew the power of inner motives and that was why he prayed that God should search his heart and purge him of evil ways.
Father, purge me of wong motive In Jesus name