Beck introduced two partition statistics N T (r, m, n) and M ω (r, m, n), which denote the total number of parts in the partition of n with rank congruent to r modulo m and the total number of ones in the partition of n with crank congruent to r modulo m, respectively. In recent years, a number of congruences and identities on N T (r, m, n) and M ω (r, m, n) for some small m have been established. In this paper, we prove an identity on N T (r, 8, n) and M ω (r, 4, n) which confirm a conjecture given by Mao.