fixes for npm build