A stable X-FEM in cohesive transition from closed to open crack