Nested functions were fixed in SpatialStatsFFT