fix error in view.js