Added automatic swap to the button