Fixed index bug in SQL message bus