Fixed the eacn loop for table.