Fixed redirect issue on safari