fixes to modulus