Fixed pivot_row definition function.