Added loading check for buttons