Improved popup's loading from url