Fix bug in getUriFromUrl