Fix bug

* Reset sensor state before setting polarity