uart class tends to misbehave. unsure of cause