fixed a missing line in the confirm method and an error in logic in the same