fix bug and publish to npm