bug fixing on TOTAL ROWS