Merge changes from 1.4 branch and also updated pagination to not display
the 'Prev' button if the current page is the first page nor the 'Next'
button if the current page is the last page