Fixed where clause
Merge pull request #20 from RWOverdijk/hotfix/threadMessages

Fixed where clause