Fixed error in reporting if communication port is open.