Adding minor upstream changes.
Updated deprecated import.