Fixed button state updating in popup