Help me configure notifications

I need to monitor few devices status so I have configured the polling configuration as follows:
Polling configuration.JPG
Also, I have created 2 email notifications (one in case of failure, and in case service is restored)as follows:

Failure email notification settings:
Fail email.JPG
Service Restored email notification settings:
OK email.JPG
As you can see, I have configured the Failure email to wait for 1 hour before sending the alerts, and it does that.

Also, I have configured the OK email to wait 10 minutes before sending an OK email.

So, where is the problem? Ok, I have been getting many OK emails without corresponding failure emails.

How can I configure the Dude (if possible) to send Ok email only for the cases which had sent a failure email.?

Maybe it is going from up to unknown and back to up?