Fixed the problem. Also corrected the new stdp model.