use correct hook for redirect