Fixing the order of math packages.