Conditionals not working for specific usergroup


Well-known member
I have added an additional "Staff online" sidebar, but called "Sponsors online" which I only want to list members online who are in usergroup 6.

I am using this code:

<!-- block: sidebar_online_sponsors -->
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3>Sponsors Online Now</h3>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{xen:helper ismemberof, $visitor, 6}">
                                <xen:avatar user="$user" size="s" img="true" />
                                <xen:username user="$user" rich="true" />
                                <div class="userTitle">{xen:helper userTitle, $user}</div>
<!-- end block: sidebar_online_sponsors -->
But ALL on-line members are showing there, even if they are not members of usergroup 6.

What have I done wrong here please?