fix bug that cause js scripts to miss the error js function