Semaphors added, deadlocks are still a problem