remove redundant borders