Layer number incorrect in mainsale

I’m using kipper/moonraker/mainsail on my voron trident. (love it!)
The dashboard is consistently showing the incorrect layer count and layer number when printing.
I’ve gotten around it by adding the following to my slicer on the new layer custom code.

M117 laying {layer_num+1}/{total_layer_count}

What this does is show the real layer number in the front display.
And it is accurate. How to get mainsail/clipper to do the same?