Fixing a closure issue