fixes for lambdas and models