Fix complete_common_string() problem