Enhanced uri handling