fix for printing for 8 rows
fix the printing for 10 rows