found and fixed sign-flip error in xcorr code