Fix for issue #17
Merge pull request #22 from janakaonline/master

Fix for issue #17. Thanks @janakaonline