fix long stdout read issue