 
         // Check whether the post-synaptic neuron has fired now
         if (d_last_spike_time_of_each_neuron[post_neuron_id] == currtime){
-          vogels_pre_memory_trace[indx] += 1.0f;
           float new_syn_weight = d_synaptic_efficacies_or_weights[idx];
           new_syn_weight += stdp_vars.learningrate*(vogels_pre_memory_trace[indx]);
           d_synaptic_efficacies_or_weights[idx] = new_syn_weight;

      // Running though all stdp synapses
      while (indx < total_number_of_plastic_synapses){
	// First decaying the memory traces
	vogels_pre_memory_trace[indx] *= expf(-timestep / stdp_vars.tau_istdp);
	vogels_post_memory_trace[indx] *= expf(-timestep / stdp_vars.tau_istdp);
        // Getting an index for the correct synapse
        int idx = d_plastic_synapse_indices[indx];


        int post_neuron_id = d_postsyns[idx];

        // Check whether the pre-synaptic neuron has fired now
        if (d_last_spike_time_of_each_neuron[post_neuron_id] == currtime)
          vogels_post_memory_trace[indx] += 1.0f;
        if (d_last_spike_time_of_each_neuron[pre_neuron_id] == currtime)
          vogels_pre_memory_trace[indx] += 1.0f;

        if (d_last_spike_time_of_each_neuron[pre_neuron_id] == currtime){
          float new_syn_weight = d_synaptic_efficacies_or_weights[idx];
          new_syn_weight += stdp_vars.learningrate*(vogels_post_memory_trace[indx]);
          // Alpha must be calculated as 2 * targetrate * tau_istdp
          new_syn_weight += - stdp_vars.learningrate*(2.0*stdp_vars.targetrate*stdp_vars.tau_istdp);
          d_synaptic_efficacies_or_weights[idx] = new_syn_weight;
