fixed bug where lambda wrapping was putting function arguments in reverse order