Fixed compilation warnings on unused variables