GCode viewer is running behind the actual situation

What is the problem?
I've noticed that when the print is progressing the Gcode viewer is not showing the actual situation.
For instance:
Gcode viewer is repoorting layer #24 and the printer and the Display layer info plugin reports layer #37.
Screendump from Octopi

Has anyone a solution?

Long discussion about this behavior:

And the solution:


Thanks for your response, will install the plugin and I'm pretty sure it will solve this issue.