fixed URL genration bug