span errors fix