fixing bugs with removing equation fragments