Safeguard for numberOfButtons