fixes parameters when redirect is set