updated the spike injection handling