The problem is likely that at the end of each part a M30 is in the G-code. Please try to replace in your program M30 by M60. M60 will not stop the spindle between the different parts.