Fixed referenced before assigned
Merge branch 'lookup_bug_fix' into rentmethod