Fix uri detection.