fixed invocation of subprocess