Fix var type inference2

Giving it another try.
ok