fix modbus crash