Fixed equation bug