Fixed process deadlock