Backport 1.8 3698

Backport fft fixes.