fixing bug with clicking on a fragment in an equation