replace g_hash_table_contains with g_hash_table_lookup