prev button should now work properly.