Fixed logic for button text change.