Fixes on StatisticsStorage and TransactionManager