Replace the <= to < in the Command M907, M350 and M351.
The for loop for Axis count over the Array.
Add a break after M907