bug closing the span element