Fix build error and deprecation warning.

Signed-off-by: Peter Atashian <retep998@gmail.com>