Fixed showing undefined when empty msg is submitted