Fixed issue with refresh causing prev/next buttons not to work.