add button deactivate function