fixed a small bug that caused serial version to crash.