Several fixes to AOL and tests

I'd rather put this in the C program or the `run_tests.sh` script.