fixes for span, typeof