Add wait URL changed function