Added index in parameters when creating spikes in init method