Fixed incorrect code for average transmission