Watch for both front and rear edge of the magnet.

Able to work with much tighter sensor delay this way