Preventing table from overflowing