Remove extra spaces around position list