It might be worth adding a comment explaining what is happening here.  I was a little surprised that the logic was reversed (disable when running).  Of course, that makes sense, but I didn't get it right away.