fixed a bug in computing ADMaxInds