fixed bug where mathematical functions were ignored