fixed index error occurring if line elements are present in original 2d mesh