fixed a bug with lambda + new testcases