more bug fixes
Merge pull request #7 from EmFoley/bug_fixes

more bug fixes