Fixed error where exception would be thrown if MATH was undefined

This repairs an error where users who want to use the template but don't want to use the Math module are not inconvenienced at all.