Fix NameError for missing 'record' variable.
Merge pull request #120 from fimmtiu/master

Fix NameError for Missing 'record' Variable.