fix header redirect issue