Added delay decrementing in the tick handler