Semaphore was not working as I intended - trying "synchronized"