Further fixes function closure