Corrected fragment testing for setting URLs.