better initialization of proc & tfun
typo in sqlite3_step in insert_modules_sql_mom.