Move away from deprecated query call.