Some instance typing improvements