fixing incorrect dictionary addition in example code when a new message is added.