fixed minor bug with remainder function in q10