Disable run button until the function finishes