Fix test failures.
Merge remote branch 'upstream/master'
Merge pull request #60 from tonyhuang/master

Add in errorcode.
Fix failing test