Fix error in the buttons hide and show