fixed errors for npm test