Fix lambda referencing problem