fixed crash when thread.start is called on the same thread