Minor improvements in load_script(...)