removing bugs of subprocess