Fixed 2 bugs

#33 and #34
Merge pull request #35 from pikesley/bug-fixes

Fixed 2 bugs