Redirection loop issue fixed