Replacing all instances of 'simple' detrending with 'linear' detrending.  This appears to solve a problem with Turkey data in particular