improves uri handling