diff --git a/lib/suapiv2.php b/lib/suapiv2.php
index 7da1c226a4955e2dd696d78499e3455e2c27ca96..4bf5db893c680ce5994944134acbf8e571bf6a55 100644
--- a/lib/suapiv2.php
+++ b/lib/suapiv2.php
@@ -31,7 +31,7 @@ $membership_data = $formated_raw_data["table1"]["table1_Product_Collection"]["ta
 
 // make a new array that just contains *every* member no matter what they bought
 $just_members = array();
-foreach ($membership_data["Detail_Collection"] as $member) {
+foreach ($membership_data["Detail_Collection"]["Detail"] as $member) {
     array_push($just_members, $member["@attributes"]);
 }