Fix deprecated function use.