what the... Fixed some problems but found new ones

Clang build fails, maybe something to do with lambda...
Need to find out :)