Issues with Serial Read and write