Fix #29, but still need more test to verify it
I just add "volatile" prefix in every possible variable which has been optimized out.