Fix URI handling