Added rounding to integer when average returns a float