Get right doc size when redirecting closing #191