Update use of deprected function.