fix case where there are no tables