Fixed MessageQueue::getLast() SQL request