fix secure dynamic url bugs