Fix script js bug