Fixed bug causing a crash with URL override

Fixed bug when a matching URL for overriding is found. When preparing the script execution, the variable "i" is cleared so it is no longer possible to find it. That was causing a crash when attempting to call it. The variable will still be cleared but AFTER the script execution not before.