added function for fixing url