Adjust script in main view.