equation bug fix