- fixed if clause for update
- fixed assert for last state
- improved selftest
Merge pull request #20 from zerosync/dev_sappo

fixed minor stuff