Fix crash during g_hash_table_destroy()