fixed wrong handling of table files with header (for reading)