minor adjustments for table detection