Adapted to mods to the Button type.