clean-up redirect code some (fixing non-ie9 bugs)