fixed hanging python