fix bugs in processes