fixed bug in subprocess selection