Fixed escaping bug with modulo