fix bugs that cause redundent ellipsis