fix function.js