rectified a bug in `modulo`