Fix bug with invalid contact messages