bug fixes
Merge pull request #82 from ccd0/bug-fixes

bug fixes