Fixes re-start of script when pressing start button.