[FIX] variable scope
[FIX] variable scope