more scripting fixes