Fix "variable referenced before assignment" error
Merge pull request #3595 from archtaku/quickfix

Fix "variable referenced before assignment" error