Fix for missing beforeRedirect warning