fix transaction calculation #1