Fixed evaluation bugs in lambda and define