Solving problems with insert_query and get_queries in LM_interface