fix url mapping error

fix a bug that failed to assign a collect URL in some cases.