Bug fixes

I have found and fixed a couple of bugs with displaying fragmented messages. One is a function scope issue the other is a table lookup issue.