fixes equations slightly