little fix, average turned to double