register/unregister buttons, fix the layout