fixed error handling on setBinaryState
Merge pull request #3 from skynetim/master

fixed error handling on setBinaryState