app: fix redirect handler