minor bug in correlate