caught error when table is empty