fixes segfault when using generic plc