declare variables before use them
fix bug
Merge pull request #22 from aleafs/fix_global_leaks

fix global leaks