fixed the calling of buttons