Replace deprecated ctor