adding semaphore logic to default theme

suggested by Romulo Bordezani