updates to fix a few bugs
Merge pull request #4 from nwwatson/master

updates to fix a few bugs