fixed bugs in math type checking
Merge pull request #62 from bdurkee/master

fixed bugs in math type checking