fix weird issue that caused the url to print twice