Correct edge cases where script becomes null mid-display.