Fixing reference before assignment error
Merge pull request #163 from Thorsten-Sick/small_db_fix

Fixing reference before assignment error