fix xcorr indexing