--- a/src/dgt_fac.c
+++ b/src/dgt_fac.c
@@ -1,6 +1,6 @@
 #include "config.h"
-#include "fftw3.h"
 #include "ltfat.h"
+#include "ltfat_types.h"
 
 
 LTFAT_EXTERN LTFAT_NAME(dgt_long_plan)
@@ -36,7 +36,7 @@
    plan.cf = (LTFAT_REAL*) ltfat_malloc(2*d*q*q*W*sizeof(LTFAT_REAL));
 
    /* Get factorization of window */
-   LTFAT_NAME(wfac)(g, L, 1, a, M, plan.gf);
+   LTFAT_NAME_COMPLEX(wfac)(g, L, 1, a, M, plan.gf);
 
   /* Create plans. In-place. */
    plan.p_veryend =