added condition for failed address