Swap out deprecated function for successor in upgrade