fix $buttons variable