Fixes for lots of scripts, and for empty script blocks.