I added some logic to control the user interaction availability of the navigation buttons