move url loading after layout finishing to prevent crashes.