Fix var type inference2

Giving it another try.
same here