Splitting Code not working properly

why don't you read everything in and then parse it once you get the enter key,

 while(Serial.available() > 0) {
      myChar = Serial.read(); 
      currentLine += myChar;
      if (myChar == '\n') {
          int     spacePosition;  // the position of the next comma in the string
          spacePosition = currentLine.indexOf(' ');
          wordOne =currentLine.substring(0,spacePosition);
          wordTwo =currentLine.substring(commaPosition+1, currentLine.length());
          }
          currentLine = "";
    }