Fixes panel opening

Last issue remaining: if the button is left while the panel is opening,
unchecking the button is broken.