Threading fixed except when thread is interrupted