More tweaking to drain scripts