modulo: fix modulo value when result is 0