Fixes another average calculation ordering error