script error fixing