Midi filtertering of stop start messages

blh64, can't thank you enough!
Works like a charm now, but one thing puzzles me.
Whilst

begins with every new start after stopping, it appears to just come in early every time afterwards, just before the beat and therefore before the led on the master clock. What could be causing this? Is it possibly sitting in the wrong place within the code?