fixing span error