Fix detection of buttons.