Fix deprecated constructors &new