Fix the button disable/enable logic.