remove double spaces before matching