Next and previous button fixes.