Correctly hide the buttons