fix lexical closure bug