Bug fix for prev and next links issue

Somehow the current number is being concatenated with + 1 resulting in:  1 + 1 (11). So I have wrapped the numbers with parseInt to make sure we are getting integers. This fixed my issue.