math escaping bugfix