Swapping out deprecated method for non-deprecated call.