Still working on threading problem. Data refreshes but render_template does not