Not Using Static Variable Correctly