Fix script file bug