Merge pull request #58 from yangk/bug-fixes

Bug fixes