Fixing getter code for rows and cols.