fixing bug with removing equation components