Fix undefined in redirect.