instead of setting the recordset to only return 5 records, set the repeat region to only show 5 records.
the rand() functions changes the order, the limit function limits the results to only 5 records.
these two together will cause the recordset to return different results each time, so the record for the item being added to the cart no longer exists.