Fix function typo in redirect code