Fix serial read hanging