bugfix for average grade calculator