fix a bug in confirm