fix type guessing inside anon functions