fixed bugs in running processes