fixed bug #6
Merge pull request #18 from hilarym/master

fixed issue #6. Good!