fixed subprocess calling