did some more thorough testing, fixed a couple semaphore bugs