Fixed some bugs
Merge branch 'master' of github.com:allenxyz/ditto