Fix for #24
Fix for #21
Merge pull request #25 from JonnyHeavey/master

Minor bug fixes.