fixed NaN errors
Merge branch 'master' of https://github.com/lu16j/statemachines