fixed subprocess bug