Fix typo and C++14 issue with capture