Correct error with isRunning flag being inverted