Added boundary checking for next & previous buttons.