Fixed IF statement for tickerDelay variable