merged with master
Merge pull request #32 from msh345/bug_fixes2

merged with master