added running=false to when thread interrupted