rename the "_urlFinal" to "_finalUrl" and fix a bug in this function