fix some error spans