Fix URI generation