fixed for undefined messages