Avoid rendering outside the table when not needed

Finally made it