Fix bugs caught by the oracle.