A few misc bug fixes
Merge pull request #64 from darbyfrey/bug_fixes

A few misc bug fixes