fix more sql for talk templates