fixing error res not as param when call redirectUrl