Fixed payperiod bug