fix view.js issue