Fix lambda params changed before launching thread