fix span closing