Fixes #1
Fixes #2
Merge pull request #3 from linuxwolf/master

Fixes issues #1 and #2