Added debug, small simulation plugin fix