half messages are being returned, resulting in scary error messages. improved sql query should fix this. Also pagination of messages.