ironed out a bug with appending gcodes