[FIX] Using 64 bit integers in compute_gain for large read sets.