"And Pharaoh sent, and called for Moses and Aaron, and said unto them, I have sinned this time: the Lord is righteous, and I and my people are wicked.
Entreat the Lord (for it is enough) that there be no more mighty thunderings and hail; and I will let you go, and ye shall stay no longer.
And when Pharaoh saw that the rain and the hail and the thunders were ceased, he sinned yet more, and hardened his heart, he and his servants.
And the heart of Pharaoh was hardened, neither would he let the children of Israel go; as the Lord had spoken to Moses."
Moses continues to go before Pharaoh asking that the children of Israel be let go. Plaques come and Pharaoh agrees to let them go, once it stops, he hardens his heart and denies them the right to leave.
I cannot help but think of the times I have done the same thing. I was a fair weather Christian. I would cry to the Lord when I suffered, then when I had relief I went back to my own ways. It took many, many cycles before I realized there had to be a better way. Only through these experiences could I see God's hand in all that I went through. I had to learn His way was better than my own. I can now see the mercy in God allowing me to suffer. If I hadn't gone through all these things I would have never found Him.