Bug fixed in snr calculation.