fixed npm test bugs