hide prev/next buttons when they aren't necessary