fnGetAdjacentTr function does not work going to prev/next page
fnGetAdjacentTr function does not work going to prev/next page

I am using the fnGetAdjacentTr function (gets the rows adjacent to the current selected row) for my next/previous buttons navigation. It works great when navigating records on the same page. However, when I get to the last record on the page and hit next, it doesn't go to the next record at the next page. Same goes for doing a prev navigation where the view has to go the previous page.
Looking at the function, it seems that it's failing at this statement as it doesn't get past here:
var iCurrent = oSettings.oApi._fnNodeToDataIndex( oSettings, nTr );
Any help will be appreciated.
Thanks!