Fix deprecated warnings.