Fix for issue #1, added test, updated npm version