fixed bug to work on npm