fix broken npm function