Fix a build error and changed a function in the parser to reduce the need for a lambda.