Fix URL generation