Minor scripting tweaks