Changed so that redirect also closes request.