Modbus fixes

Minor fixes in the modbus handler
Can you add an issue for that?