fix firing rate calculation