Fix equation errors