add support for delete custom tables and fix broken flush command