Correctly implemented the delegate that allows for button presses.