Fix subprocess collecting