fixed some equation errors