Fix: use kernel in closure