Fix a critical bug in R.mathMod
Merge pull request #334 from markprzepiora/fix-mathmod

Fix a critical bug in R.mathMod