small improvments to parsing of output