Help with code that is not working correctly

The two 'if' statements with && should be inside the first 'if' statement so that they are only tested when a serial character is available.

void loop()
{
  buttonState = digitalRead(buttonPin);

  if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == 'H' && buttonState == HIGH) {
      myservo.write(180);
      delay(1500);
      digitalWrite(ledPin, HIGH);  

    }
    if (incomingByte == 'L' && buttonState == LOW) {
      myservo.write(90);
      delay(1500);
      digitalWrite(ledPin, LOW);

    }
  }
}

Pete