fixed version with reading whole port (thanks to MartinL and VlastimilD) [CBI vs. CBR)