bug-fix: semaphore use not implemented correctly

- the semaphore release needed to occur after the
assignment is fully created