adding button confirm detection
bugfix