Fix error handling in Port::read.