That bug was fixed a few days ago in v4.1.0a What it was that it was filtering the forums wrong. People browsing in forum1 would include people from forum14, forum2 from forum20.
When UBB 6.1 comes out gold, that problem should go away when you install the new WOL. If the problem is of immmediate concern though, please give me a shout and I'll give you the correct Perl code to fix it.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.