fixed a few bugs
Merge pull request #38 from conor-mac-aoidh/master

bug fixes