fixed a bug in temp.js