Fixed memory leak

Added dispatch_release the semaphore