fixed lamda issues for older gcc