remove unneeded var (issue #6466)