another wack at fixing hang on really long scripts and tasks