sub_scripting: fixed bug