fixed serious memory bug

untested adds to sebs msg_gen
fix bug in message generator (buffer not set)