added a check for wrong message content