Fixed variable name bug causing crash as well as improving performance by about 10 seconds on our dataset for tot_speaks by moving constant DB queries out of the loop.
Fixed variable name bug causing crash as well as improving performance by about 10 seconds on our dataset for tot_speaks by moving constant DB queries out of the loop.

Benjamin-Marks/mit-tab-appengine,jolynch/mit-tab,jolynch/mit-tab,Benjamin-Marks/mit-tab,jolynch/mit-tab,Benjamin-Marks/mit-tab-appengine,Benjamin-Marks/mit-tab,Benjamin-Marks/mit-tab,jolynch/mit-tab,Benjamin-Marks/mit-tab-appengine