Clean up unused variables
Merge pull request #2860 from ghost1227/issue/2859

Clean up unused variables