Error in library.js