Fix document getter for npm