Fix for #1 plus test cases
Bump version for npm