Correctly implement addInv for Mod5