Fix caching closure