remove unneeded separators