Fix stdout redirect.