Prevent multiple Screen Savers from running trouble


I recently created a screen saver with Delphi1.
To prevent multiple instances from running
I added at the beginning

If HPrevInst<>0 then Exit;

However, now the screen saver runs in
the following manner. (Timeout = 2 minutes).
After first 2 minutes, the screen saver starts
After running in 2 minutes, the screen saver stops

What's wrong?