I think you should test here that the To tag is filled in, and that it is the same as the From tag on the subsequent NOTIFY.