Fixed some problems with failing Modbus connections.