Fix span space bug