fixing bugs with removing equation fragments on ios