Fixing G-Code generation