support insert/update states bug
Merge pull request #66 from betz/master

support insert/update states bug