fix error when there are no transaction