Updated after changes to math library