handle empty tables