fixed the serialEvent