cut long names and titles (fix for #388)