Fixes for script templates