Fixed twitter and hopefully thread shutdown errors