added msg.sameUrl guard