Changing Page Calculation Issue

I was having a problem with changing pages using BackGrid and tracked the problem back to line 830 of this file. When I clicked "Next Page" on the grid pager, sometimes it would append the number 1 rather than ADD the number 1 to the current page. Ex: I'm on page 31, next page is 32, but the script told it to go to page 311. There may be a better place to put parseInt() because somewhere along the line of setting currentPage it is accidentally a string. I looked briefly for where it may be happening, but didn't find it.