bug fix and update to npm