Fix issue #28
Fix issue #30 and issue #31
Merge pull request #32 from willynilly/issue_28

Fix issue #28
Merge pull request #33 from willynilly/issue_30

Fix Issue #30 and issue #31