Fixed bugs in compute_volume_avg due to incompatible pointer types