Fix input
Fix semaphores; add PCB not found debug