Fixed bug in modulus operator