fix creation of the COORD keyword

basically, the loop went one index too little...