Fix initialization (PCint bug)
Fix function's scope mistake