double redirect error solved