Fixed bug in generateCoords not calling itself correctly.