Fixed confirm() method