Fix: pass the cfg variable here, not NULL