Fix average score logic