Fixed issue with portState and StdClass