fix a crash when determining whether to force a redirect