Fix variable usage before it defined
Merge pull request #12 from ssbb/master

Fix variable usage before it defined