Fix rendering problem when span is below a non-span