Fix bugs of miss understanding of js closure