Fixed several embarrassing errors and potential problems in tox_array.