Fix update function, replaced {$table} with `{$table}`