Bugfix for global name 'math' not defined