Bugfix -- use scale, and fix autocorrelation optimization