Fix average_data