Updated to work with ButtonModel.