fixed URL error in secure mode