[fix] unnecessary variable and fix variable definitions