bug fixes; add heisenbug.py now we can do heisenbug test