We need to see the whole sketch to see what might be affecting things.
delayMicroseconds(finalDelay); try 'unsigned int' for finalDelay
"the largest value that will produce an accurate delay is 16383"
BTW delayMicroseconds has a granularity if 4us.