fix to insert.js