Make finish a global.

Because all of this program share only one finish semaphore.