Fix math equation errors