bug 1383: cleanup ac.php, (undefined index, undefined offset)