Fixed bug prevents sensors to stop

Jira issue: WP-736
Merge pull request #455 from glatorre/WP-736

Fixed bug prevents sensors to stop [WP-736]