Merge pull request #7 from zachleat/master

Fix for #5 and #6