Fixed bug with empty tables