Fix stdout issues