Fixed the double-button bug