fixes proper removal of redirecturl after redirect