fix index to be an index of the notification number and handle processing errors and resending