Fixed Endless Redirection loop issue