Making prev/next buttons more accurate