fix double redirect