Fix error with missing span