Fix missing table write