put in a fix to messages to get rid of memory leak