fixed closures in init and match