Fix rendering empty tables

When there is no data page 0 instead of 1 is rendered.