Fix lambda pickling issue.