Fix mod in math mode