Bug fix in getTransactionsInPeriod