Provider class also needs upcast