added limit for semaphore releases