remove $app->hook to fix redirect bug