fix bug, python thread problem