tts endLoop() fix

tts was throwing an error when switching between training protocols.
Checking to see if it was running an event loop before calling endLoop()
seems to have fixed it.