Fix bundle URL dectection script