Fixing a couple of bugs.
Merge pull request #16 from thedereck/master

Fixing a couple of bugs.