Fix redirectUrl regression in debug mode