Fix hive connector semaphore release bug