Fixed intermittent utf-8 related issue in some url generation.