Added counter resetting and thread interruption to fix #3
Merge pull request #4 from malaverdiere/develop

Added counter resetting and thread interruption to fix #3