fixing buttons that vanish when errors occur