Modified Initialize button state change while refreshing