Octoprint end of job

I’ve setup Octoprint on a Raspberry Pi and I use the Vertex Repetier/CuraEngine app on Windows to generate G-code files. It works fine and at the end the printhead is sent to XY home and the fans stop.
I found that after successfully printing I had problems starting subsequent prints and usually had to restart octoprint and sometimes even the Pi. The main effect was that the uploaded file didn’t show any details, and I couldn’t disconnect/connect the printer.
After a couple of these incidents I also reset the printer and then noticed that the status on the LCD showed ‘Vertex waiting…’

It looks like there is something missing from the end of the G-Code, but if I print directly from Repetier on the PC it works fine.

I realize I should probably post this on the octoprint forum but I noticed a couple of comments on octoprint here and it may still be a printer thing…

Can you post your gcode?

If you want the whole file I need to open an account somewhere, otherwise this is the end of the file. I notice it doesn’t seem to match the ‘End G-Code’ defined in CuraEngine

G1 X76.381 Y96.117 E709.9143 F3120 M107 G1 E700.9143 F4200 G0 X76.381 Y96.117 Z26.5 F10800 M107 G91 T0 G1 E-1 M104 T0 S0 M104 T1 S0 G90 G92 E0 M140 S0 M84 T0 T1 T0 M104 T0 S0 M140 S0 G90 G1 X200 Y200 F4800 M84

(Time to start learning G-Code…)