UnboundLocalError issue #641
Merge pull request #642 from aventurella/develop

UnboundLocalError issue #641