Luke 1:18-23 (ESV)
And Zechariah said to the angel, "How shall I know this? For I am an old man, and my wife is advanced in years."  And the angel answered him, "I am Gabriel, who stands in the presence of God, and I was sent to speak to you and to bring you this good news.  And behold, you will be silent and unable to speak until the day that these things take place, because you did not believe my words, which will be fulfilled in their time."  And the people were waiting for Zechariah, and they were wondering at his delay in the temple.  And when he came out, he was unable to speak to them, and they realized that he had seen a vision in the temple. And he kept making signs to them and remained mute.  And when his time of service was ended, he went to his home.
“And behold, you will be silent and unable to speak until the day that these things take place, because you did not believe my words, which will be fulfilled in their time.” So here is the righteous man who walked blamelessly in the statues of the Lord. No w he fails to believe the words of Gabriel. It is quite phenomenal that it should work out this way.
The Bible is full of such things though. The righteousness God sees is not the righteousness man sees. And god does punish us for our sins temporally, he disciplines us that is. But this has no bearing on the fact that he loves us, and sees us as righteous despite our failures to be so. Zechariah is rendered mute. But he is still blessed with the child that will be John the Baptist who points us to our righteousness and the righteousness of Zecharia, Jesus Christ.