Fix URI processing