fixed error during redirection and controller response