fix for empty tables